import request from '@/utils/request'
//用对象接受查询参数
export const searchAllApi = (name,begin,end,page,pageSize) => 
  request.get(`/clazzs?name=${name}&begin=${begin}&end=${end}&page=${page}&pageSize=${pageSize}`)
//新增
export const addApi = (clazz) =>  request.post('/clazzs', clazz);
//根据ID查询
export const queryInfoApi = (id) =>  request.get(`/clazzs/${id}`);
//修改
export const updateApi = (clazz) =>  request.put('/clazzs', clazz);
export const deleteApi = (id) =>  request.delete(`/clazzs/${id}`);

export const queryAllClazzsApi = () => request.get('/clazzs/list');